home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / BARNET / HOWTOS / READICON
Text File  |  1997-03-23  |  993b  |  28 lines

  1. You need to use Wimp_TransferBlock for reading out of the applications
  2. workspace.  For that you need to know the task handle.  Here is some code
  3. for reading the title bar of any window.  You should be able to modify that.
  4.  
  5.     REM what task does it belong to ?
  6.     buffer%!0 = 20
  7.     buffer%!4 = my_wimp_handle%
  8.     buffer%!8 = 0
  9.     buffer%!12 = 0
  10.     buffer%!16 = 0
  11.     SYS "Wimp_SendMessage",19,buffer%,window%,icon% TO ,,task_handle%
  12.  
  13.     REM title direct/indirect ?
  14.     a%=(buffer%!60) AND &100
  15.     REM obtain window title
  16.     IF a% THEN
  17.      SYS "Wimp_TransferBlock",task_handle%,buffer%!76,handle%,buffer%,256
  18.      XOS_SynchroniseCodeAreas=&2006E: REM This is a bodge for a bug in 3.70
  19.      SYS XOS_SynchroniseCodeAreas,0
  20.      title$ = FN0(buffer%)
  21.     ELSE
  22.       title$ = FN0(buffer%+76)
  23.     ENDIF
  24.  
  25. --
  26. |- Nick Craig-Wood ---------------------------------- ncw@axis.demon.co.uk -|
  27. |-------- He's not at his desk right now.  Could I take a message? ---------|
  28.